A Prolog Implementation of Kem
نویسندگان
چکیده
In this paper, we describe a Prolog implementation of a new theorem prover for (normal propositional) modal and multi–modal logics. The theorem prover, which is called KEM , arises from the combination of a classical refutation system which incorporates a restricted (“analytic”) version of the cut rule with a label formalism which allows for a specialised, logic–dependent unification algorithm. An essential feature of KEM is that it yields a rather simple and efficient proof search procedure which offers many computational advantages over the usual tableau–based proof search methods. This is due partly to the use of linear 2–premise β rules in place of the branching β rules of the standard tableau method, and partly to the crucial role played by the analytic cut (the only branching rule) in eliminating redundancy from the search space. It turns out that KEM method of proof search is not only computationally more efficient but also intuitively more natural than other (e.g. resolution–based) methods leading to simple and easily implementable procedures (two KEM Theorem Prover–like systems have been implemented: an LPA interpreter on Macintosh, and a Quintus compiler on Sun-Sparcstation) which make it well suited for efficient automated proof search in modal logics. 1 An overview of KEM KEM [AG94, Gov95] is a tableau–like modal proof system based on D’Agostino and Mondadori’s [DM94] classical refutation system KE. The basic feature of KEM is that it uses KE rules in combination with a label unification scheme constituted of (1) a label formalism, and (2) a specialised, logic–dependent unification algorithm. The label formalism arises from two (non empty) sets ΦC = {w1, w2, · · ·} andΦV = {W1,W2, · · ·} respectively of constant and variable world– simbols through the following definition: a world–label is either (i) an element of the set ΦC , or (ii) an element of the set ΦV , or (iii) a path term (k′, k) where (iiia) k′ ∈ ΦC ∪ ΦV and (iiib) k ∈ ΦC or k = (m′,m) where (m′,m) is a label. Intuitively, we may think of a label i ∈ ΦC as denoting a (given) world, and a label i ∈ ΦV as denoting a set or worlds (any world) in some Kripke model. A label i = (k′, k) may be viewed as representing a path from k to a (set of) world(s) k′ accessible from k (according to the appropriate accessibility relation. For any label i = (k′, k) we shall call k′ the head of i, k the body of i, and denote them by h(i) and b(i) respectively. Notice that these notions are recursive: if b(i) denotes the body of i, then b(b(i)) will denote the body of b(i), b(b(b(i))) will denote the body of b(b(i)); and so on. We shall call each of b(i),b(b(i)), etc., a segment of i. Let s(i) denote any segment of i (obviously, by definition every segment s(i) of a label i is a label); then h(s(i)) will denote the head of s(i). For any label i, we shall define the length of i, l(i), as the number of world–symbols in i (obviously l(s(i)) will denote the lenght of s(i)). We shall call a label i restricted if h(i) ∈ ΦC , otherwise we shall call it unrestricted. KEM ’s label unification scheme involves two kinds of unifications, respectively “high” and “low” unifications. “High” unifications are meant to mirror specific accessibility constraints. They are used to build “low” unifications which account for the full range of conditions governing the appropriate accessibility relation. Let = denote the set of labels. A substitution is defined in the usual way as a function ΦV −→ =− where =− = = − ΦV . For two labels i, k and a substitution σ, if σ is a unifier of i and k, then we shall say that i and k are σ-unifiable. We shall (somewhat unconventionally) use (i, k)σ to denote both that i and k are σ-unifiable and the result of their unification. On this basis we can define several specialised, logic–dependent notions of σ “high”(or σ-) unification. In particular, the notion of two labels i, k being σ-, σ-, and σ -unifiable is defined in the following way: (i, k)σK = (i, k)σ ⇐⇒ (i) at least one of i and k is restricted, and (ii) for every s(i), s(k), l(s(i)) = l(s(k)), (s(i), s(k))σK
منابع مشابه
An Encoding of XQuery in Prolog
In this paper we describe the implementation of (a subset of) the XQuery language using logic programming (in particular, by means of Prolog). Such implementation has been developed using the Prolog interpreter SWI-Prolog. XML files are handled by means of the XML Library of SWI-Prolog. XPath/XQuery are encoded by means of Prolog rules. Such Prolog rules are executed in order to obtain the answ...
متن کاملQD-Janus: a Sequential Implementation of Janus in Prolog
Janus is a language designed for distributed constraint programming. This paper describes QDJanus, a sequential implementation of Janus in Prolog. The compiler uses a number of novel analyses and optimizations to improve the performance of the system. The choice of Prolog as the target language for a compiler, although unusual, is motivated by the following: (i) the semantic gap between Janus a...
متن کاملA Data Base Extension of Prolog and its Implementation
A method is presented to extend the programming language Prolog with a capability to access a relational data base system. Since the data type ‘relation' is basic in Prolog, and since Prolog is based on interpretation of a subset of predicate calculus, such an interface becomes simpler in Prolog than in most other languages, and the same language, extended Prolog, may be used both for programmi...
متن کاملImplementation of Tag Representation in Prolog Virtual Machine
Even if it is understood that Prolog execution environment performs dynamic type checking on data being processed, it is often unclear how implementation of the language internally represents the information used to verify the type compatibility. In this paper we describe a Prolog tag encoding mechanism used in the Logic Virtual Machine (LVM) implementation of Prolog. The LVM is a Prolog engine...
متن کاملAn Architecture for Prolog Extensions
We address the task of an efficient implementation of Prolog extensions. Prolog is a very good language for prototyping and almost any extension can be quickly written in Prolog using a Prolog interpreter and tested on small examples. It is harder to find out if the results scale up to large, real life problems, though. A Prolog interpreter, even if partially evaluated with respect to a given p...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1995